import axios from '../model/axios'


export const projectsAdd = (data:any)=>{
    return axios({
        method:'post',
        url:"/api/projects/add",
        headers:{
            token:window.localStorage.getItem('token')
        },
        data
    })
}

export const projectsQuery = (params:any)=>{
    return axios({
        method:'get',
        url:"/api/projects/query",
        headers:{
            token:window.localStorage.getItem('token')
        },
        params
    })
}
// export const projectsManagerQuery = (params:any)=>{
//     return axios({
//         method:'get',
//         url:"/api/projects/managerquery",
//         headers:{
//             token:window.localStorage.getItem('token')
//         },
//         params
//     })
// }

export const projectsAllquery = (params:any)=>{
    return axios({
        method:'get',
        url:"/api/projects/Allquery",
        headers:{
            token:window.localStorage.getItem('token')
        },
        params
    })
}

export const projectsGroup = (params:any)=>{
    return axios({
        method:'get',
        url:"/api/projects/group",
        headers:{
            token:window.localStorage.getItem('token')
        },
        params
    })
}

export const projectsUpdate = (data:any)=>{    
    return axios({
        method:'patch',
        url:"/api/projects/update",
        data
    })
}

export const projectsDel = (data:any)=>{
    return axios({
        method:'delete',
        url:"/api/projects/del",
        data
    })
}